from .AIAssistant import AIAssistant

class VoiceAssistant(AIAssistant):
    """语音助手类，专门用于处理语音相关任务"""
    
    def __init__(self, id, name, version, online, score, voice_type, is_multilingual):
        super().__init__(id, name, "语音助手", version, online, score)
        self._voice_type = voice_type
        self._is_multilingual = is_multilingual
    
    # Getter和Setter方法
    @property
    def voice_type(self):
        return self._voice_type
    
    @voice_type.setter
    def voice_type(self, voice_type):
        self._voice_type = voice_type
    
    @property
    def is_multilingual(self):
        return self._is_multilingual
    
    @is_multilingual.setter
    def is_multilingual(self, is_multilingual):
        self._is_multilingual = is_multilingual
    
    def process_task(self, task_content):
        """处理语音任务"""
        print(f"正在为【{self.name}】分配语音任务：{task_content}")
        
        # 模拟语音处理过程
        multilingual_tag = "（多语言支持）" if self._is_multilingual else ""
        self.status_message = f"语音处理完成：{task_content}{multilingual_tag}"
        print(f"✅ {self.status_message}")
        return True
    
    def display_info(self):
        """显示助手的详细信息"""
        super().display_info()
        print(f"   声音类型: {self._voice_type}")
        print(f"   是否支持多语言: {'是' if self._is_multilingual else '否'}")